package myfirstproject.firstproject.Mapper;

import myfirstproject.firstproject.domain.VO.ArticleUserVO;
import myfirstproject.firstproject.domain.VO.UserVo;
import myfirstproject.firstproject.domain.po.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-09-16
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select count(*) from user where username = #{username}")
    int checkID(String username);

    @Select("select u.nickname,u.sex from user u where u.id = #{publisher1}")
    ArticleUserVO queryUserAndAddressById(String publisher1);
}
